<template>
  <el-dialog
    top="30px"
    width="80%"
    title="查看"
    close="dialog-sm"
    append-to-body
    :close-on-click-modal="false"
    :before-close="beforeClose"
    :visible.sync="visible"
  >
    <el-tabs>
      <el-tab-pane label="代偿表">
        <compensatory-list
          :query-id="queryId"
          :visible="visible"
          @success="handlerSuccess"
        ></compensatory-list>
      </el-tab-pane>
      <el-tab-pane label="追偿表">
        <recovery-list
          :query-id="queryId"
          :visible="visible"
          @success="handlerSuccess"
        ></recovery-list>
      </el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>

<script>
import CompensatoryList from '@/credit/views/city/reportCity/ledger/component/CompensatoryList'
import RecoveryList from '@/credit/views/city/reportCity/ledger/component/RecoveryList'

export default {
  components: {
    CompensatoryList,
    RecoveryList,
  },
  props: {
    visible: Boolean,
    queryId: String,
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
    handlerSuccess() {
      this.$emit('success', true)
    },
  },
}
</script>

<style lang="scss" scoped></style>
